package cn.com.aiouyi.controller.web;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.com.aiouyi.entity.Article;
import cn.com.aiouyi.service.ArticleService;

@Controller(value = "articleController")
@RequestMapping("/article")
public class ArticleController extends BaseController{

	@Resource(name = "articleServiceImpl")
	private ArticleService articleService;

	@GetMapping
	public String index(Long articleId, ModelMap model){
		
		Article article = articleService.find(articleId);
		model.put("article", article);
		return "/web/article";
	}
	
}
